package com.itheima.overLoad;

public class Demo3Method {
    public static void main(String[] args) {
        int[] arr = {11, 22, 66, 44, 55};
        int result = getMax(arr);
        System.out.println(result);
    }

    public static int getMax(int[] arr) {
        int max = arr[0];
        for (int i = 1; i < arr.length; i++) {
            if (max < arr[i]) {
                max = arr[i];
            }
        }
        return max;
    }
}
